<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        console.log(1)
        async function fn() {
            console.log(4)
            // await 后面如果不是promise而是具体值，则会把其转换为Promise成功的结果
            const res = await 2  // Promise.resolve(2)
            console.log(res)
        }
        fn()
        console.log(3)

        //  1 4 3 2
    </script>
</body>

</html>